<style>

</style>

<template>
  <div class="form-arr-header">
    <slot name="after_begin"></slot>
    <div class="form-arr-header__item" v-for="key in keys">{{getDef(key + '.ui.label')}}</div>
    <div>操作</div>
  </div>
</template>


<script>
export default {
  name: 'FormArrHeader',
  props: {
    config: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  computed: {
    keys() {
      return Object.keys(this.config.items.properties)
    }
  },
  methods: {
    getDef(path, defaultVal) {
      return ZY.lodash.get(this.config.items.properties,path, defaultVal)
    }
  }
}
</script>
